﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace HotelManager
{
    public class CommonHelper
    {
        public static bool Updata = false;

        public static void OpenForm(Form FormType)
        {
            FormCollection fc = Application.OpenForms;
            foreach (Form item in fc) {
                if (!item.Name.Equals(FormType.Name))
                {
                    FormType.Show();
                    FormType = Form.ActiveForm;
                    break;
                }
            }
        }

        public static void CloseAllFormInPanel(List<Form> fr) {
            for (int i = 0; i < fr.Count; i++)
            {
                fr[i].Hide();
            }
        }

     }

  
}
